﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Microsoft.Xna.Framework;

namespace Oroboros.Objects
{
    public class Vector2Wrapper : INotifyPropertyChanged
    {
        private Vector2 m_vect;

        public event PropertyChangedEventHandler PropertyChanged;
        public void Changed(string n)
        {
            if (!string.IsNullOrEmpty(n))
                PropertyChanged(this, new PropertyChangedEventArgs(n));
        }

        public Vector2Wrapper()
        {
            this.m_vect = Vector2.Zero;
        }

        public Vector2Wrapper(Vector2 vector)
        {
            this.m_vect = vector;
        }

        public Vector2Wrapper(float p_x, float p_y)
        {
            this.m_vect = new Vector2(p_x, p_y);
        }

        public float X { get { return m_vect.X; } set { Changed("X"); m_vect.X = value; } }
        public float Y { get { return m_vect.Y; } set { Changed("Y"); m_vect.Y = value; } }
    }
}
